val upperIt: (String) -> String = { s: String -> s.uppercase() + s.uppercase() }
fun func2(s: String): String = upperIt.invoke(s)
| Function Call | Return Value | |||
|---|---|---|---|---|
| func2("abc") | → | |||
| func2("table") | → | |||
| func2("house") | → | |||
Experiment with this code on Gitpod.io or as a Kotlin Playground